package org.jbch.shittim;

import android.util.Log;
import android.widget.ProgressBar;

public class ShittimInfo {
	  private final static String TAG = ShittimInfo.class.getSimpleName();
	  public enum DownloadState {
	    NOT_STARTED,
	    QUEUED,
	    DOWNLOADING,
	    COMPLETE
	  }
	  
	  private volatile DownloadState mDownloadState = DownloadState.NOT_STARTED;
	  private volatile Integer mProgress;
	  private volatile ProgressBar mProgressBar;
	  
	  private final String mFilename;
	  private final Integer mFileSize;
	  private final String mId;
	  private final String mTitle;
	  private final String mWriter;
	  private final String mPubDate;
	  private final String mDesc;

 
	public ShittimInfo(String id, String title, String writer, String pubDate,
			String description, String filename, Integer size) {
		
		mId = id;
		mTitle = title;
		mWriter=writer;
		mPubDate=pubDate;
		mDesc=description;
		mFilename = filename;
		mProgress = 0;
		mFileSize = size;
		mProgressBar = null;
	}

	
	  public String getmId() {
		return mId;
	}


	public String getmTitle() {
		return mTitle;
	}


	public String getmWriter() {
		return mWriter;
	}


	public String getmPubDate() {
		return mPubDate;
	}


	public String getmDesc() {
		return mDesc;
	}


	public ProgressBar getProgressBar() {
	    return mProgressBar;
	  }
	  public void setProgressBar(ProgressBar progressBar) {
	    Log.d(TAG, "setProgressBar " + mFilename + " to " + progressBar);
	    mProgressBar = progressBar;
	  }
	  
	  public void setDownloadState(DownloadState state) {
	    mDownloadState = state;
	  }
	  public DownloadState getDownloadState() {
	    return mDownloadState;
	  }
	  
	  public Integer getProgress() {
	    return mProgress;
	  }

	  public void setProgress(Integer progress) {
	    this.mProgress = progress;
	  }

	  public Integer getFileSize() {
	    return mFileSize;
	  }

	  public String getFilename() {
	    return mFilename;
	  }
	}